package com.gov.dna.admin.controller;

import com.gov.dna.common.annotation.SysLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Dtt
 * @Description //TODO
 * @Date 15:09 2019/1/4
 * @Param
 * @return
 **/
@Slf4j
@RestController
@RequestMapping("/dell")
@CacheConfig(cacheNames = "users3")
public class TestController {

    //@Cacheable(key ="#id")
    @SysLog("hfvshfvdhf")
    @GetMapping("put")
    public String dell(@RequestParam String id) {
        log.info("==============数据库中去数据=========");
        /*Permission permission = new Permission();
        permission.setIcon("222");
        permission.setNote("333");
        permission.setUrl("4444");*/
        return "111";
    }

    /*@Cacheable(cacheNames = "product", key = "1")
    @GetMapping("get")
    public Permission getDell() {
        Permission permission = new Permission();
        permission.setIcon("222");
        permission.setNote("333");
        permission.setUrl("4444");
        return permission;
    }*/
}
